﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Diagnostics;

namespace WindSimCDMenu
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Menu_StartService_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"WindSimServiceHost\WindSimServiceHost.exe";
                p.Start();
            }
            catch (Exception ex)
            {

            }
        }

        private void Menu_StartController_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"WindSimController\WindSimController.exe";
                p.Start();    
            }
            catch (Exception ex)
            {
                
            }
        }

        private void Menu_StartModel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"WindSimModel\WindSimModel.exe";
                p.Start();
            }
            catch (Exception ex)
            {

            }
        }

        private void Menu_DokController_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"Dokumentation\WindSim_Dokumentation_Controller.pdf";
                p.Start();
            }
            catch (Exception ex)
            {

            }
        }

        private void Menu_DokModell_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"Dokumentation\WindSim_Dokumentation_Modell.pdf";
                p.Start();
            }
            catch (Exception ex)
            {

            }
        }

        private void Menu_Project_MouseDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = @"Projekt\WindSim.sln";
                p.Start();
            }
            catch (Exception ex)
            {

            }
        } 
        
        private void Close_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Application.Current.Shutdown();
        }
    }
}
